import styles from './index.module.scss'
import Button from '@c/button'
import { cacheLineState } from '@/store'
import { useSetRecoilState } from 'recoil'

const Index = props => {
  const { clearErrorCode, lineArr } = props
  const updateLineState = useSetRecoilState(cacheLineState)

  const reTry = () => {
    updateLineState({ ...lineArr[0] })
    clearErrorCode()
  }

  return (
    <div className={styles.click}>
      <p className={styles.getVipText}>该影视暂无可播线路，看看其他内容吧~</p>
      <Button hover="opacity" className={styles.getVip} onClick={reTry}>
        重试
      </Button>
    </div>
  )
}

export default Index
